Vue3.0下载和安装教程
浏览:1082 次

1.对于独立版本,我们可以直接在Vue.js的官方网站上下载最新版本,并使用 ;脚本>;标签介绍。
2.使用CDN方法,我们从国外推荐了两个稳定的CDN。我们在中国还没有找到更好的CDN,因此建议在本地下载。
静态文件CDN(国内):;
unpkg:,它将与npm发布的最新版本保持一致。
cdnjs:;
静态文件CDN(国内)

取消锁定(推荐)
cdnjs
3.NPM方法安装缓慢。本教程使用淘宝的图像及其命令npm。有关安装和使用,请参阅。
npm版本需要大于3.0。如果低于此版本,则需要升级:
#查看版本$npm-v2.3.0#升级npmcnpm-install-npm-g#升级或安装cnpmnpm-install-cnpm-g使用Vue.js构建大型app时,建议使用cnpm进行安装。cnpm可以与Webpack或Browserify模块打包器配合使用:
#最新稳定版本$cnpm安装vue@next命令行工具Vue.js提供了一个官方命令行工具,可用于快速构建大型单页app。

对于Vue 3,应使用npm上提供的Vue CLI v4.5作为@Vue/CLI。要升级,应全局重新安装最新版本的@vue/cli:
#全局安装vue cliyarn Global add@vue/cli#或cnpm install-g@vue/cli安装后查看版本:
$vue(美元)--version@vue/Cli 4.5.11然后在Vue项目中运行:
Vue upgrade--next注意:Vue cli 3.x和Vue cli 2.x使用相同的Vue命令。如果您以前安装过vue cli 2.x,它将被替换为vue cli 3.x。
要创建项目,我们使用vue-init命令创建以下示例:
$vue-init webpack runoob-vue3-test#此处需要一些配置。默认情况下,按Enter?项目名称runoob-vue3-test?项目描述Vue.js项目?作者runoob

$cd runoob-vue3-test$cnpm run dev DONE在2558ms内成功编译nbsp; ; ;I您的app正在此处运行:https://localhost:8080成功执行上述命令后访问https://localhost:8080/ 。
注意:Vue.js不支持IE8及其以下IE版本。
Template: main
Session:
Session type: db
[unisoft__unisoft] Array ( [permission] => [human_valid] => [passport] => )
Loaded Class:
Zend_Db: /web/unisoft/web.system/Zend/Db.php
Zend_Db_Adapter_Abstract: /web/unisoft/web.system/Zend/Db/Adapter/Abstract.php
Zend_Db_Adapter_Mysqli: /web/unisoft/web.system/Zend/Db/Adapter/Mysqli.php
Zend_Db_Profiler: /web/unisoft/web.system/Zend/Db/Profiler.php
Zend_Db_Statement_Interface: /web/unisoft/web.system/Zend/Db/Statement/Interface.php
Zend_Db_Statement: /web/unisoft/web.system/Zend/Db/Statement.php
Zend_Db_Statement_Mysqli: /web/unisoft/web.system/Zend/Db/Statement/Mysqli.php
Zend_Registry: /web/unisoft/web.system/Zend/Registry.php
Zend_Db_Table_Abstract: /web/unisoft/web.system/Zend/Db/Table/Abstract.php
Zend_Session_Abstract: /web/unisoft/web.system/Zend/Session/Abstract.php
Zend_Session: /web/unisoft/web.system/Zend/Session.php
Zend_Session_SaveHandler_Interface: /web/unisoft/web.system/Zend/Session/SaveHandler/Interface.php
Zend_Session_SaveHandler_DbTable: /web/unisoft/web.system/Zend/Session/SaveHandler/DbTable.php
Zend_Exception: /web/unisoft/web.system/Zend/Exception.php
Zend_Session_Exception: /web/unisoft/web.system/Zend/Session/Exception.php
Zend_Db_Select: /web/unisoft/web.system/Zend/Db/Select.php
Zend_Db_Table_Select: /web/unisoft/web.system/Zend/Db/Table/Select.php
Zend_Db_Expr: /web/unisoft/web.system/Zend/Db/Expr.php
Zend_Db_Table_Rowset_Abstract: /web/unisoft/web.system/Zend/Db/Table/Rowset/Abstract.php
Zend_Db_Table_Rowset: /web/unisoft/web.system/Zend/Db/Table/Rowset.php
Zend_Db_Table_Row_Abstract: /web/unisoft/web.system/Zend/Db/Table/Row/Abstract.php
Zend_Db_Table_Row: /web/unisoft/web.system/Zend/Db/Table/Row.php
HTTP: /web/unisoft/web.system/class/cls_http.inc.php
Zend_Session_Namespace: /web/unisoft/web.system/Zend/Session/Namespace.php
system_setting_class: /web/unisoft/web.core/system/setting.php
Zend_Cache: /web/unisoft/web.system/Zend/Cache.php
Zend_Cache_Backend: /web/unisoft/web.system/Zend/Cache/Backend.php
Zend_Cache_Backend_Interface: /web/unisoft/web.system/Zend/Cache/Backend/Interface.php
Zend_Cache_Backend_ExtendedInterface: /web/unisoft/web.system/Zend/Cache/Backend/ExtendedInterface.php
site_ip_class: /web/unisoft/web.core/site/ip.php
Zend_Validate_Interface: /web/unisoft/web.system/Zend/Validate/Interface.php
Zend_Validate: /web/unisoft/web.system/Zend/Validate.php
Zend_Loader: /web/unisoft/web.system/Zend/Loader.php
Zend_Validate_Abstract: /web/unisoft/web.system/Zend/Validate/Abstract.php
TPL: /web/unisoft/web.system/class/cls_template.inc.php
Savant3_Error: /web/unisoft/web.system/Savant3/Error.php
package_main_class: /web/unisoft/web.core/package/main.php
iot_hardware_main_class: /web/unisoft/web.core/iot/hardware/main.php
iot_hardware_category_class: /web/unisoft/web.core/iot/hardware/category.php
site_service_main_class: /web/unisoft/web.core/site/service/main.php
site_article_main_class: /web/unisoft/web.core/site/article/main.php
site_article_extra_class: /web/unisoft/web.core/site/article/extra.php
site_keyword_exclude_class: /web/unisoft/web.core/site/keyword/exclude.php
system_content_class: /web/unisoft/web.core/system/content.php
site_article_attachment_class: /web/unisoft/web.core/site/article/attachment.php
site_article_category_class: /web/unisoft/web.core/site/article/category.php
Database [main master]
[ Log time: 1788215075.7655 ] [ Expend time: 0.0050411224365234 ] Connect DB
Cache
[ Log time: 1788215075.7783 ] Backend:
[ Log time: 1788215075.7791 ] [ Expend time: 0.000768 ] Get Cache: settings_ef8c7cef1f80fbad45b9ee480e92d03c, result type: array
[ Log time: 1788215075.7794 ] [ Expend time: 0.000254 ] Get Cache: crond, result type: boolean
[ Log time: 1788215075.792 ] [ Expend time: 0.000729 ] Get Cache: model_7ec70ee0360b8a929eb442cbc38dfd27, result type: array
[ Log time: 1788215075.7956 ] [ Expend time: 0.002776 ] Get Cache: model_eebc36c56f6ebd5dc315368f04ea4f0d, result type: array
[ Log time: 1788215075.7969 ] [ Expend time: 0.000603 ] Get Cache: model_87644abf3b1d496cbf4b1667422d7d51, result type: array
[ Log time: 1788215075.799 ] [ Expend time: 0.000965 ] Get Cache: site_service_list_7e49c82f3098f580fb5928807f5e466d, result type: array
[ Log time: 1788215075.8085 ] [ Expend time: 0.001708 ] Get Cache: site_keyword_exclude_b2c64c08a5048d87cc4904022274c118, result type: array
[ Log time: 1788215075.8189 ] [ Expend time: 0.001899 ] Get Cache: site_keyword_exclude_b2c64c08a5048d87cc4904022274c118, result type: array
[ Log time: 1788215075.8242 ] [ Expend time: 0.001727 ] Get Cache: site_keyword_exclude_b2c64c08a5048d87cc4904022274c118, result type: array
[ Log time: 1788215075.8383 ] [ Expend time: 0.001966 ] Get Cache: site_keyword_exclude_b2c64c08a5048d87cc4904022274c118, result type: array
[ Log time: 1788215075.8488 ] [ Expend time: 0.000362 ] Get Cache: a0ebfa0d692575d022f65693741b3e89, result type: boolean
[ Log time: 1788215075.8521 ] [ Expend time: 0.001507 ] Save Cache: a0ebfa0d692575d022f65693741b3e89, result type: integer
Database [core master]
[ Log time: 1788215075.7829 ] [ Expend time: 0.0016129016876221 ] Connect DB
[ Log time: 1788215075.7837 ] [ Expend time: 0.00070905685424805 ] SELECT `z_ip`.* FROM `z_ip` WHERE (ip = '216.73.217' AND visit_time = 1788215040) LIMIT 1
[ Log time: 1788215075.7856 ] [ Expend time: 0.001784086227417 ] UPDATE z_ip SET visit_count = visit_count + 1 WHERE ip = '216.73.217' and visit_time = 1788215040
[ Log time: 1788215075.7865 ] [ Expend time: 0.00086402893066406 ] DELETE FROM z_ip WHERE visit_count < 120 and visit_time <= 1788214860
[ Log time: 1788215075.7874 ] [ Expend time: 0.00069904327392578 ] SELECT SUM(visit_count) AS `n0` FROM `z_ip` WHERE ((ip = '216.73.217') AND is_delete = 0)
[ Log time: 1788215075.8044 ] [ Expend time: 0.0033109188079834 ] SELECT `z_article`.* FROM `z_article` WHERE (no = 'a5a0d1a64237bff5') LIMIT 1
[ Log time: 1788215075.8062 ] [ Expend time: 0.00099706649780273 ] SELECT `z_article_extra`.* FROM `z_article_extra` WHERE (is_delete = 0 AND article_id IN(6231))
[ Log time: 1788215075.8224 ] [ Expend time: 0.0010209083557129 ] SELECT `z_article_extra`.* FROM `z_article_extra` WHERE (article_id = 6231) LIMIT 1
[ Log time: 1788215075.8341 ] [ Expend time: 0.0010688304901123 ] SELECT `z_article_attachment`.* FROM `z_article_attachment` WHERE (article_id = 6231 AND is_delete = 0) ORDER BY `id` DESC
[ Log time: 1788215075.8363 ] [ Expend time: 0.0020079612731934 ] SELECT `z_article`.* FROM `z_article` WHERE (is_delete = 0 AND category_id = 34 AND is_enable = 1) ORDER BY `id` DESC LIMIT 5
[ Log time: 1788215075.8505 ] [ Expend time: 0.001655101776123 ] UPDATE z_article SET view_count = view_count + 1 WHERE id = 6231
[ Log time: 1788215075.8537 ] [ Expend time: 0.00082302093505859 ] SELECT `z_article_category`.* FROM `z_article_category` WHERE (id = 34) LIMIT 1
Escape time: 0.10543608665466, 0 queries, PHP Memory usage: 5585.5859375 KB, Server time: 2026-09-01 06:24:35